// @ts-ignore
import {Component, useState, useEffect} from 'react'
// @ts-ignore
import {connect} from "react-redux";
import Taro, {usePullDownRefresh, useReachBottom} from "@tarojs/taro";
import {View, Image} from "@tarojs/components";

// 静态资源
import './index.scss'
// @ts-ignore
import contactIcon from '../../assets/images/my/contact.png'
// @ts-ignore
import moreIcon from '../../assets/images/my/more.png'




function GoodBuyItem() {

    let [headImg, setHeadImg] = useState("https://weiju-wechat.oss-cn-shenzhen.aliyuncs.com/head_portrait/luoyonghao.jpg")
    let [goodImg, setGoodImg] = useState("")

    return (
        <View className="good-buy-item-container">

            <View className="good-buy-item">

                {/* 用户头像 & 交易状态 */}
                <View className="user-info-status-container">

                    {/* 买家信息 */}
                    <View className="user-info-container">
                        <Image className="head-img" mode="aspectFill" src={headImg}></Image>
                        <View className="nick-name">老罗</View>
                    </View>

                    {/* 交易状态 */}
                    <View className="transaction-status">
                        交易成功
                    </View>

                </View>

                {/* 商品信息 */}
                <View className="good-info-container">

                    <Image className="good-img" mode="aspectFill" src={headImg}></Image>
                    <View className="good-introduce">
                        自用闲置的好的，老罗照片一张adfasdfasdfasdfdsaffasdfadfa
                    </View>

                </View>

                {/* 实付款 */}
                <View className="payment-word">
                    <View className="word">实付款</View>
                    <View className="money-container">
                        <View className="unit">￥</View>
                        <View className="money">10.00</View>
                    </View>
                </View>

                {/* 联系卖家 查看评价 */}
                <View className="function-container">

                    {/* 联系卖家 */}
                    <View className="contact-user">
                        <Image className="contact-icon" src={contactIcon}></Image>
                        <View className="word">联系卖家</View>
                    </View>

                    {/* 查看评价 */}
                    <View className="examine-good-container">
                        <View className="examine-btn">查看评价</View>
                        <View className="more-btn">
                            <Image className="more-icon" src={moreIcon}></Image>
                        </View>
                    </View>

                </View>

            </View>

        </View>
    )
}

function MyBuy() {

    return (
        <View>

            <GoodBuyItem />

        </View>
    )
}

export default MyBuy
